/*
(a) -86
(b) -18
(c) 0
(d) -2
*/

#include <iostream>

using std::cout;
using std::endl;

int main(){
    cout << (-30 * 3 + 21 / 5) << endl;
    cout << (-30 + 3 * 21 / 5) << endl;
    cout << (30 / 3 * 21 % 5) << endl;
    cout << (-30 / 3 * 21 % 4) << endl;
    return 0;
}